adc2mv

Converts raw Analog to Digital Converter count values to millivolts.

Contents

Syntax

Y = adc2mv(X, voltageRange, maxValue)

Description

adc2mv(X, voltageRange, maxValue) returns millivolt values corresponding to the Analog to Digital Converter Count and the voltage range set.

Example

X = [-32512 -16256 0 16256 32512];
voltageRange = 2000; % ±2 V range
maxValue = 32512;

Y = adc2mv(X, voltageRange, maxValue)
Y =

       -2000       -1000           0        1000        2000

Input Arguments

The units for voltageRange can be changed e.g. volts.

Output Arguments

Note: If a different unit is used for the input X, then Y will have the corresponding units.

See Also

mv2adc

Copyright: © 2015-2019 Pico Technology Ltd. All rights reserved.